package com.kyivmohyla.kma2.shared.model;

import java.io.Serializable;

public class UIEquipment implements Serializable {
    private static final long serialVersionUID = 1L;

    private int equipmentId;
    private String name;
    private int isParent;
    private int parentId;
    private String description;

    public UIEquipment(int equipmentId, String name, int isParent, int parentId, String description) {
        this.equipmentId = equipmentId;
        this.name = name;
        this.isParent = isParent;
        this.parentId = parentId;
        this.description = description;
    }

    public UIEquipment() {
    }

    public int getEquipmentId() {
        return equipmentId;
    }

    public void setEquipmentId(int equipmentId) {
        this.equipmentId = equipmentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIsParent() {
        return isParent;
    }

    public void setIsParent(int isParent) {
        this.isParent = isParent;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof UIEquipment)) return false;

        UIEquipment equipment = (UIEquipment) o;

        return equipmentId == equipment.equipmentId;

    }

    @Override
    public int hashCode() {
        return equipmentId;
    }

    @Override
    public String toString() {
        return "Equipment(equipmentId = " + equipmentId + ", name = " + name + ", isParent = " + isParent + ", parentId = " + parentId + ", description = " + description + ")";
    }

}